import random

setGlobalDuration(30)
a = genSoundTable('ounkmaster.aif')

example = 1

if example == 1:
    looper(a)

elif example == 2:
    line = genLineseg([0, 1000, 1])
    readTable(bus='panner', table=line)
    looper(a, panVar='panner')

elif example == 3:
    looper(a, pitch=[random.randint(-100,100)*0.001+1 for i in range(10)], 
            amplitude=.5, pan=[random.randint(0,100)*0.01 for i in range(10)])

elif example == 4:
    randomi(bus=[i for i in range(10)],
            mini=[random.randint(900,1000)*0.001 for i in range(10)],
            maxi=[random.randint(1001,1100)*0.001 for i in range(10)],
            rate=[random.randint(10,60)*0.1 for i in range(10)])
    looper(a, pan=[random.randint(0,100)*0.01 for i in range(10)],
           amplitude=.5, pitchVar=[i for i in range(10)])

startCsound()